
import {Session} from '/@/utils/storage';
export const tableOption = {
  labelPosition: 'right',
  labelWidth: 110,
  border: true,
  index: true,
  indexLabel: '序号',
  emptyBtn: true,
  emptyText: '清空',
  indexWidth: 60,
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  searchMenuSpan: 6,
  dialogWidth:'50%',
  searchMenuPosition: 'left',
  searchLabelWidth: 'auto',
  selection: true,
  column: [
    {
      type: 'input',
      label: '告警类型',
      prop: 'typeName',
      hide: true,
      search:true,
      rules:[{
        required: true,
        message: '名称必须填写',
        trigger: 'blur'
      }],
    },
    {
      type: 'input',
      label: '告警类型',
      prop: 'typeName',
      addDisplay: false,
      editDisplay: false
    },
    {
      type: 'select',
      label: '告警方式',
      prop: 'wayList',
      overHidden: true,
      dicUrl:'/api/admin/dict/type/alarm_way',
      dicHeaders: {
        authorization: 'Bearer ' + Session.get('token')
      },
      props:{
          label: 'label',
          value: 'value'
      },
      rules:[{
        required: true,
        message: '报警方式必选',
        trigger: 'blur'
      }]
    },
    {
      type: 'select',
      label: '告警等级',
      prop: 'level',
      overHidden: true,
      dicUrl:'/api/admin/dict/type/alarm_level',
      dicHeaders: {
        authorization: 'Bearer ' + Session.get('token')
      },
      props:{
          label: 'label',
          value: 'value'
      },
      rules:[{
        required: true,
        message: '告警方式必选',
        trigger: 'blur'
      }],
      
    },
    {
      type: 'input',
      label: '告警声音',
      prop: 'sound',
    },
    {
      type: 'input',
      label: '推送用户',
      slot: true,
      hide: true,
      prop: 'senderList'
    },
    {
      type: 'input',
      label: '推送用户',
      prop: 'senderName',
      overHidden: true,
      addDisplay: false,
      editDisplay: false
    },
    {
      type: 'radio',
      label: '是否启用',
      prop: 'status',
      dicData: [
        {
          label: '启用',
          value: 1
        },
        {
          label: '未启用',
          value: 0
        }
      ]
    },
    {
      type: 'input',
      label: '创建时间',
      addDisplay: false,
      editDisplay: false,
      prop: 'createTime'
    }
  ]
}
